package org.example.pojo;

import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.example.validation.groups.Create;
import org.example.validation.groups.Login;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    //用户名
    @NotNull(message = "用户名不能为空",groups = {Login.class, Create.class})
    private String userName;
    //唯一id
    private Integer id;
    //所属学校代码
    @NotNull(message = "学校代码不能为空",groups = {Login.class,Create.class})
    private Integer schoolCode;
    //姓名
    @NotNull(message = "姓名不能为空",groups = {Create.class})
    private String name;
    //密码
    @NotNull(message = "密码不能为空",groups = {Login.class,Login.class})
    private String password;
    //是否是超管
    private Boolean isSuper;
    //创建时间
    private Date CreateTime;
    //最后登陆时间
    private Date UpdateTime;
    //是否是默认密码 1是默认密码 0不是默认密码
    private String isDefPassword;
    //手机号
    @NotNull(message = "手机号不能为空",groups = {Create.class})
    private String phone;
    private String remarks;
    //标记项目
    private String markedProjects;
}
